package com.wicket.okrbff.web.contorller;

import cn.hutool.core.bean.BeanUtil;
import com.wicket.okrbff.biz.service.OfficialDocumentService;
import com.wicket.okrbff.biz.service.dto.req.*;
import com.wicket.okrbff.biz.service.dto.res.*;
import com.wicket.okrbff.common.ro.OkrResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import java.util.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.wicket.okrapp.integration.FwAppOfficialDocumentClient;
import com.wicket.okrapp.integration.dto.QueryMyReceiveOfficialDocumentListRespDto;
import com.wicket.okrapp.integration.dto.QueryMyReceiveOfficialDocumentListReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffMyReceiveOfficialDocumentDto;
import java.util.stream.Collectors;
import com.wicket.okrapp.integration.dto.UpdateOfficialDocumentRespDto;
import com.wicket.okrapp.integration.dto.UpdateOfficialDocumentReqDto;
import com.wicket.okrbff.common.exception.Assert;
import com.wicket.okrapp.integration.dto.QueryOfficialDocumentListRespDto;
import com.wicket.okrapp.integration.dto.QueryOfficialDocumentListReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffOfficialDocumentDto;
import com.wicket.okrapp.integration.dto.AddOfficialDocumentRespDto;
import com.wicket.okrapp.integration.dto.AddOfficialDocumentReqDto;
import com.wicket.okrapp.integration.dto.QueryOfficialDocumentDetailRespDto;
import com.wicket.okrapp.integration.dto.QueryOfficialDocumentDetailReqDto;
import com.wicket.okrframework.integration.FwBaseInductionRecordClient;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailBorderRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailBorderReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffAnnexDto;
import com.wicket.okrbff.common.util.CommonFunctionHelper;
import com.wicket.okrapp.integration.dto.QueryReceiveOfficialDocumentListRespDto;
import com.wicket.okrapp.integration.dto.QueryReceiveOfficialDocumentListReqDto;
import com.wicket.okrapp.integration.dto.DocumentDto;
import cn.hutool.core.collection.CollectionUtil;
import com.wicket.okrframework.integration.FwBaseNullClient;
import com.wicket.okrframework.integration.dto.BatchQueryUserinfoRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryUserinfoReqDto;
import com.wicket.okrapp.integration.dto.DeleteOfficialDocumentRespDto;
import com.wicket.okrapp.integration.dto.DeleteOfficialDocumentReqDto;
import com.wicket.okrapp.integration.dto.QueryUnscheduledOfficialDocListRespDto;
import com.wicket.okrapp.integration.dto.QueryUnscheduledOfficialDocListReqDto;
import com.wicket.okrcomponent.integration.FwCompMessageClient;
import com.wicket.okrcomponent.integration.dto.QuerySingleMessageRecipientListListComRespDto;
import com.wicket.okrcomponent.integration.dto.QuerySingleMessageRecipientListListComReqDto;
import com.wicket.okrframework.integration.dto.BatchQueryOriginalRoleMemberInductionRecordComRespDto;
import com.wicket.okrframework.integration.dto.BatchQueryOriginalRoleMemberInductionRecordComReqDto;
import com.wicket.okrbff.biz.service.dto.common.BffWorkSceneGroupsDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailComBorderRespDto;
import com.wicket.okrframework.integration.dto.QueryInductionRecordDetailComBorderReqDto;
import com.wicket.okrframework.integration.dto.DeptDto;

/**
 * @author ：
 * @date ：
 *
 *
 * @version 1.0
 */
@Api(value = "OfficialDocument", tags = { "OfficialDocument" })
@RestController
// @RequestMapping("/oms/officialDocument/")
public class OfficialDocumentController {

  @Autowired
  OfficialDocumentService officialDocumentService;
/**
   * B3查我接收的公文列表
   * gen by moon at 11/12/2023, 10:22:27 PM
   */
    @PostMapping("/oms/officialDocument/queryMyReceiveOfficialDocumentList")
    @ApiOperation(value = "B3查我接收的公文列表", response = OkrResult.class)
    public OkrResult<BffQueryMyReceiveOfficialDocumentListRespDto> queryMyReceiveOfficialDocumentList(@RequestBody(required=false) @Validated BffQueryMyReceiveOfficialDocumentListReqDto reqDTO){
        return OkrResult.success(officialDocumentService.queryMyReceiveOfficialDocumentList(reqDTO));
    }
/**
   * B3修改公文
   * gen by moon at 11/12/2023, 10:38:57 PM
   */
    @PostMapping("/oms/officialDocument/updateOfficialDocument")
    @ApiOperation(value = "B3修改公文", response = OkrResult.class)
    public OkrResult<BffUpdateOfficialDocumentRespDto> updateOfficialDocument(@RequestBody(required=false) @Validated BffUpdateOfficialDocumentReqDto reqDTO){
        return OkrResult.success(officialDocumentService.updateOfficialDocument(reqDTO));
    }
/**
   * B3查询公文列表
   * gen by moon at 11/12/2023, 10:38:59 PM
   */
    @PostMapping("/oms/officialDocument/queryOfficialDocumentList")
    @ApiOperation(value = "B3查询公文列表", response = OkrResult.class)
    public OkrResult<BffQueryOfficialDocumentListRespDto> queryOfficialDocumentList(@RequestBody(required=false) @Validated BffQueryOfficialDocumentListReqDto reqDTO){
        return OkrResult.success(officialDocumentService.queryOfficialDocumentList(reqDTO));
    }
/**
   * B3新增公文
   * gen by moon at 11/13/2023, 5:06:30 PM
   */
    @PostMapping("/oms/officialDocument/addOfficialDocument")
    @ApiOperation(value = "B3新增公文", response = OkrResult.class)
    public OkrResult<BffAddOfficialDocumentRespDto> addOfficialDocument(@RequestBody(required=false) @Validated BffAddOfficialDocumentReqDto reqDTO){
        return OkrResult.success(officialDocumentService.addOfficialDocument(reqDTO));
    }
/**
   * B3查询公文详情
   * gen by moon at 11/13/2023, 5:06:40 PM
   */
    @PostMapping("/oms/officialDocument/queryOfficialDocumentDetail")
    @ApiOperation(value = "B3查询公文详情", response = OkrResult.class)
    public OkrResult<BffQueryOfficialDocumentDetailRespDto> queryOfficialDocumentDetail(@RequestBody(required=false) @Validated BffQueryOfficialDocumentDetailReqDto reqDTO){
        return OkrResult.success(officialDocumentService.queryOfficialDocumentDetail(reqDTO));
    }
/**
   * B3删除公文
   * gen by moon at 11/17/2023, 12:49:34 PM
   */
    @PostMapping("/oms/officialDocument/deleteOfficialDocument")
    @ApiOperation(value = "B3删除公文", response = OkrResult.class)
    public OkrResult<BffDeleteOfficialDocumentRespDto> deleteOfficialDocument(@RequestBody(required=false) @Validated BffDeleteOfficialDocumentReqDto reqDTO){
        return OkrResult.success(officialDocumentService.deleteOfficialDocument(reqDTO));
    }
/**
   * B3查询未安排的公文列表
   * gen by moon at 12/3/2023, 1:15:32 PM
   */
    @PostMapping("/oms/officialDocument/queryUnscheduledOfficialDocList")
    @ApiOperation(value = "B3查询未安排的公文列表", response = OkrResult.class)
    public OkrResult<BffQueryUnscheduledOfficialDocListRespDto> queryUnscheduledOfficialDocList(@RequestBody(required=false) @Validated BffQueryUnscheduledOfficialDocListReqDto reqDTO){
        return OkrResult.success(officialDocumentService.queryUnscheduledOfficialDocList(reqDTO));
    }
}
